

<!DOCTYPE html>
<html lang="en">

<head>
    {include file='./head_template'/}
</head>

<body>

    <div id="wrapper">
        {include file='./nav_template'/}

        <div id="page-wrapper">
            <div class="row">
                <div class="col-lg-12">
                    <h1 class="page-header">导航菜单与类别管理</h1>
                </div>
                <!-- /.col-lg-12 -->
            </div>
            <!-- /.row -->
            <div class="row">
                <div class="col-lg-12">
                    <div class="panel panel-default">
                        <div class="panel-heading clearfix">
                            菜单管理<a class="btn btn-sm btn-success pull-right" href="{:url('index/add')}">添加</a>
                        </div>
                        <!-- /.panel-heading -->
                        <div class="panel-body">
                            <table width="100%" class="table table-striped table-bordered table-hover" id="dataTables-example">
                                <thead>
                                <tr>
                                    <th>菜单名</th>
                                    <th>操作</th>
                                </tr>
                                </thead>
                                <tbody>

                                {volist name="$rowsMenu" id="vo"}
                                    <tr class="odd gradeX">
                                        <td>{$vo.name}</td>
                                        <td>
                                            <button class="btn btn-warning btn-sm" data-toggle="modal" data-target="#myModal" onclick="javascript:sessionStorage.setItem("updateId",{$vo.id});">修改</button>
                                            <a class="btn btn-danger btn-sm" href="{:url('actionmenu/del',['id'=>$vo.id])}">删除</a>
                                        </td>
                                    </tr>
                                {/volist}
                                </tbody>
                            </table>

                        </div>
                        <!-- /.panel-body -->
                    </div>
                    <!-- /.panel -->
                </div>
                <!-- /.col-lg-12 -->
            </div>
            <!-- /.row -->
            <div class="row">
                <div class="col-lg-12">
                    <div class="panel panel-default">
                        <div class="panel-heading clearfix">
                            标签管理<a class="btn btn-sm btn-success pull-right" href="{:url('index/add')}">添加</a>
                        </div>
                        <!-- /.panel-heading -->
                        <div class="panel-body">
                            <table width="100%" class="table table-striped table-bordered table-hover" id="dataTables-example1">
                                <thead>
                                <tr>
                                    <th>标签名</th>
                                    <th>对应的菜单</th>
                                    <th>操作</th>
                                </tr>
                                </thead>
                                <tbody>
                                {volist name="rowsTag" id="vo"}
                                    <tr class="odd gradeX">
                                        <td>{$vo.name}</td>
                                        <td>{$vo.name1}</td>
                                        <td>
                                            <!--<form action="doAction.php" method="get">
                                                <input type="text" name="text"/>
                                                <input type="text" name="act" value="editTag"/>
                                                <input type="text" name="id" value="<?php /*echo $rowTag['id']*/?>"/>
                                                <button class="btn btn-warning btn-sm" type="submit">修改</button>
                                            </form>-->
                                            <button class="btn btn-warning btn-sm">修改</button>
                                            <a class="btn btn-danger btn-sm" href="{:url('actiontag/del',['id'=>$vo.id])}">删除</a>
                                        </td>
                                    </tr>
                                {/volist}
                                </tbody>
                            </table>

                        </div>
                        <!-- /.panel-body -->
                    </div>
                    <!-- /.panel -->
                </div>
                <!-- /.col-lg-12 -->
            </div>
            <!-- /.row -->
        </div>
        <!-- /#page-wrapper -->
    </div>
    <!-- 模态框（Modal） -->
    <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
        <div class="modal-dialog">
            <div class="modal-content">
                <form action="{:url('actionmenu/edit')}" method="post">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
                    <h4 class="modal-title" id="myModalLabel">修改</h4>
                </div>
                <div class="modal-body">
                    <div class="form-group">
                    <input placeholder="请输入修改后的名称" name="text" class="form-control"/>
                    <input placeholder="id为" name="id" value="" class="form-control"/>
                    </div>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                    <button type="submit" class="btn btn-primary" >提交更改</button>
                </div>
                </form>
            </div><!-- /.modal-content -->
        </div><!-- /.modal-dialog -->
    </div>
    <!-- /.modal -->
    {include file='./foot_template'/}
</body>
</html>
